from webutils.layers.services import ManagerProxy, Service

from . import managers


class Ratelimit(Service):
    ratelimit = ManagerProxy(managers.Ratelimit)

    async def increase_or_init(self, key, expire_in):
        return await self.ratelimit.increase_or_init(key, expire_in)
